<?php
namespace app\shop\home;

use app\shop\model\News as NewsModel;

use app\admin\model\Attachment;
/**
 * 前台首页控制器
 */
class News extends Common
{
    public function group()
    {
    	$list = NewsModel::with('getimgpath')->select();
        $this->assign('list', $list);

        if(isMobile()){
            return $this->fetch('Mobile/News/group');
        }else{
            return $this->fetch();
        }
    }

    public function detail()
    {

        $info = NewsModel::with('getimgpath')->where('id',request()->param('id'))->find();
    
        $this->assign('info', $info);

        if(isMobile()){
            return $this->fetch('Mobile/News/detail');
        }else{
            return $this->fetch();
        }
    }
}